package com.team.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 收费记录表
 * @TableName charge_records
 */
@TableName(value ="charge_records")
public class ChargeRecords implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 收费来源ID
     */
    private Long targetId;

    /**
     * 病人表主键ID
     */
    private Long patientId;

    /**
     * 收费来源类型 1-->药方；2-->检查单
     */
    private Integer targetType;

    /**
     * 支付方式 1-->现金；2-->支付宝；3-->微信
     */
    private Integer paymentMethod;

    /**
     * 总金额(￥)
     */
    private BigDecimal money;

    /**
     * 实际支付金额(￥)
     */
    private BigDecimal payMoney;

    /**
     * 医保报销金额(￥)
     */
    private BigDecimal medicareMoney;

    /**
     * 支付时间
     */
    private Date payTime;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 修改时间
     */
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 收费来源ID
     */
    public Long getTargetId() {
        return targetId;
    }

    /**
     * 收费来源ID
     */
    public void setTargetId(Long targetId) {
        this.targetId = targetId;
    }

    /**
     * 病人表主键ID
     */
    public Long getPatientId() {
        return patientId;
    }

    /**
     * 病人表主键ID
     */
    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    /**
     * 收费来源类型 1-->药方；2-->检查单
     */
    public Integer getTargetType() {
        return targetType;
    }

    /**
     * 收费来源类型 1-->药方；2-->检查单
     */
    public void setTargetType(Integer targetType) {
        this.targetType = targetType;
    }

    /**
     * 支付方式 1-->现金；2-->支付宝；3-->微信
     */
    public Integer getPaymentMethod() {
        return paymentMethod;
    }

    /**
     * 支付方式 1-->现金；2-->支付宝；3-->微信
     */
    public void setPaymentMethod(Integer paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    /**
     * 总金额(￥)
     */
    public BigDecimal getMoney() {
        return money;
    }

    /**
     * 总金额(￥)
     */
    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    /**
     * 实际支付金额(￥)
     */
    public BigDecimal getPayMoney() {
        return payMoney;
    }

    /**
     * 实际支付金额(￥)
     */
    public void setPayMoney(BigDecimal payMoney) {
        this.payMoney = payMoney;
    }

    /**
     * 医保报销金额(￥)
     */
    public BigDecimal getMedicareMoney() {
        return medicareMoney;
    }

    /**
     * 医保报销金额(￥)
     */
    public void setMedicareMoney(BigDecimal medicareMoney) {
        this.medicareMoney = medicareMoney;
    }

    /**
     * 支付时间
     */
    public Date getPayTime() {
        return payTime;
    }

    /**
     * 支付时间
     */
    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    /**
     * 创建时间
     */
    public Date getCreatedTime() {
        return createdTime;
    }

    /**
     * 创建时间
     */
    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    /**
     * 修改时间
     */
    public Date getUpdatedTime() {
        return updatedTime;
    }

    /**
     * 修改时间
     */
    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ChargeRecords other = (ChargeRecords) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTargetId() == null ? other.getTargetId() == null : this.getTargetId().equals(other.getTargetId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getTargetType() == null ? other.getTargetType() == null : this.getTargetType().equals(other.getTargetType()))
            && (this.getPaymentMethod() == null ? other.getPaymentMethod() == null : this.getPaymentMethod().equals(other.getPaymentMethod()))
            && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
            && (this.getPayMoney() == null ? other.getPayMoney() == null : this.getPayMoney().equals(other.getPayMoney()))
            && (this.getMedicareMoney() == null ? other.getMedicareMoney() == null : this.getMedicareMoney().equals(other.getMedicareMoney()))
            && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
            && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTargetId() == null) ? 0 : getTargetId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getTargetType() == null) ? 0 : getTargetType().hashCode());
        result = prime * result + ((getPaymentMethod() == null) ? 0 : getPaymentMethod().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getPayMoney() == null) ? 0 : getPayMoney().hashCode());
        result = prime * result + ((getMedicareMoney() == null) ? 0 : getMedicareMoney().hashCode());
        result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", targetId=").append(targetId);
        sb.append(", patientId=").append(patientId);
        sb.append(", targetType=").append(targetType);
        sb.append(", paymentMethod=").append(paymentMethod);
        sb.append(", money=").append(money);
        sb.append(", payMoney=").append(payMoney);
        sb.append(", medicareMoney=").append(medicareMoney);
        sb.append(", payTime=").append(payTime);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", updatedTime=").append(updatedTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}